package com.ushine.design.design.c_behavioral_pattern.e_mediator.a_practice;

public abstract class Colleague {

    protected Mediator mediator;

    public Colleague(Mediator mediator) {
        this.mediator = mediator;
    }

    //声明自身方法
    public abstract void method1();

    //定义依赖方法，与中介者进行通信
    public void method2() {
        mediator.operation();
    }

}
